package com.zhang.sharding.service.impl;

import com.baomidou.dynamic.datasource.annotation.DS;
import com.zhang.sharding.entity.Order;
import com.zhang.sharding.mapper.OrderMapper;
import com.zhang.sharding.service.OrderService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class OrderServiceImpl implements OrderService {

    @Resource
    private OrderMapper orderMapper;

    @Override
    @DS("master")
    public List<Order> getAllOrders() {
        return orderMapper.selectList(null);
    }
}
